import { getToken } from "@/utils/auth";

const getters = {
  // 页面整体布局信息
  sidebar: state => state.app.sidebar,
  language: state => state.app.language,
  size: state => state.app.size,
  table_height: state => state.app.table_height + 30,

  // 页面标签
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews,

  // 用户信息
  userInfo: state => state.user.userInfo,
  id: state => state.user.id,
  userId:state=>state.user.userId,
  userRole: state => state.user.userRole,
  isRemind: state => state.user.isRemind,
  unReadCount: state => state.user.unReadCount,
  hasCollectorRole: state => state.user.hasCollectorRole,
  token: state => state.user.token,
  getAccessToken: state => state.user.token,
  userName: state => state.user.userName,
  roles: state => state.user.roles,
  status: state => state.user.status,

  setting: state => state.user.setting,
  avatar: state => state.user.avatar,
  introduction: state => state.user.introduction,

  // 菜单权限
  permission_routers: state => state.permission.routers,
  addRouters: state => state.permission.addRouters,

  // 错误日志
  errorLogs: state => state.errorLog.logs

}
export default getters
